home *** CD-ROM | disk | FTP | other *** search
/ Larry Magid's Essential Internet / Larry Magid's Essential Internet (Quarterdeck Corporation)(1995).ISO / qsockpro.qip / WESTNET.MPS < prev    next >
Text File  |  1995-10-09  |  2KB  |  70 lines

  1. # WestNet Internet Services PPP login script
  2. # Copyright 1995 Quarterdeck Corporation
  3. # Authored 6/8/95 kflick@netcom.com
  4.  
  5. #define the variables we will need
  6.  
  7. STRING username
  8. STRING password
  9. STRING framing
  10. STRING IPAddress
  11.  
  12. # uncomment for debugging
  13.  
  14. #Trace on
  15.  
  16. # reset maximum login timeout.
  17.  
  18. SetTimeout 90
  19.  
  20. CfgGetValue "Username" username
  21.  
  22. IF result = 0 THEN
  23.     GetInput "Enter your user name" username
  24.     IF result = 0 THEN
  25.         PRINT "Warning, no username entered"
  26.     ELSE
  27.         PRINT "Username set to ["; username; "]"
  28.     ENDIF
  29. ENDIF
  30.  
  31. # get password from access method
  32.  
  33. CfgGetValue "Password" password
  34. # if the Password field is empty, prompt the user for it.
  35.  
  36. IF result = 0 THEN
  37.     GetPassword "Enter your password" password
  38.     IF result = 0 THEN
  39.         PRINT "Warning, no password entered"
  40.     ELSE
  41.     # NOTE: Don't print password.
  42.         PRINT "Password set."
  43.     ENDIF
  44. ENDIF
  45.  
  46. CommWaitFor "log-in."         # wait for login prompt
  47.     #delay 5
  48.     CommSend "%r"         # send carriage return
  49. CommWaitFor "login"         # wait for login prompt
  50.     #delay 5
  51.     CommSend username     # send user name
  52.     CommSend "%r"         # send carriage return
  53. CommWaitFor "assword"         # wait for password prompt
  54.     #delay 5
  55.     CommSend password     # send password
  56.     CommSend "%r"         # send carriage return
  57. CommWaitFor "annex:"         # wait for password prompt
  58.     #delay 5
  59.     CommSend "ppp%r"     # send carriage return
  60.  
  61. #CommWaitFor "IP address is "     # wait for ip address
  62. #CommReadIPAddr IPAddress
  63. #if result>0 then
  64. #CfgSetValue "IPAddress" IPAddress
  65. #print " "
  66. #print "IP Address set to ["; IPAddress; "]"
  67. #endif
  68.  
  69. END
  70.